package com.chixing.day17_reflect_thread.thread.synchronizedDemo;

public class AnalgTest {
    public static void main(String[] args) {
        Account account = new Account("smith",0);

        for (int i =0;i<1000;i++){
            Analg analg = new Analg(account);
            analg.start();
        }
        try {
            Thread.sleep(5000);
        } catch (InterruptedException e) {
            throw new RuntimeException(e);
        }

        System.out.println("1000个终端存款完成后，再获取余额："+account.getAccMoney());
    }
}
